using Light;
using Light.Assets.Scripts.EventManager;
using UnityEngine;

namespace Dream
{
    public class LevelStarter : MonoBehaviour, IPlayerDetecedTrigger
    {
        public int sceneDataIndex;

        public void Trigger()
        {
            using var evt = NextSceneLoad.Get();
            evt.sceneDataIndex = sceneDataIndex;
            evt.isFadeScreen = true;
            evt.isExitScene = false;
            EventManager.SendEvent(evt);
        }
    }
}